﻿using System;
using System.Text;

namespace HslCommunication.Profinet.LSIS
{
	// Token: 0x02000080 RID: 128
	public class XGTAddressData
	{
		// Token: 0x1700019C RID: 412
		// (get) Token: 0x060009B7 RID: 2487 RVA: 0x0003986F File Offset: 0x00037A6F
		// (set) Token: 0x060009B8 RID: 2488 RVA: 0x00039877 File Offset: 0x00037A77
		public string Address { get; set; }

		// Token: 0x1700019D RID: 413
		// (get) Token: 0x060009B9 RID: 2489 RVA: 0x00039880 File Offset: 0x00037A80
		// (set) Token: 0x060009BA RID: 2490 RVA: 0x00039888 File Offset: 0x00037A88
		public string Data { get; set; }

		// Token: 0x1700019E RID: 414
		// (get) Token: 0x060009BB RID: 2491 RVA: 0x00039891 File Offset: 0x00037A91
		// (set) Token: 0x060009BC RID: 2492 RVA: 0x00039899 File Offset: 0x00037A99
		public byte[] DataByteArray { get; set; }

		/// <summary>
		/// 주소 문자열 표현, EX) %DW1100
		/// </summary>
		// Token: 0x1700019F RID: 415
		// (get) Token: 0x060009BD RID: 2493 RVA: 0x000398A2 File Offset: 0x00037AA2
		// (set) Token: 0x060009BE RID: 2494 RVA: 0x000398AA File Offset: 0x00037AAA
		public string AddressString { get; set; }

		/// <summary>
		/// AddressString 을 바이트 배열로 변환
		/// </summary>
		// Token: 0x170001A0 RID: 416
		// (get) Token: 0x060009BF RID: 2495 RVA: 0x000398B4 File Offset: 0x00037AB4
		public byte[] AddressByteArray
		{
			get
			{
				return Encoding.ASCII.GetBytes(this.AddressString);
			}
		}

		/// <summary>
		/// AddressByteArray 바이트 배열의 수(2byte)
		/// </summary>
		// Token: 0x170001A1 RID: 417
		// (get) Token: 0x060009C0 RID: 2496 RVA: 0x000398D8 File Offset: 0x00037AD8
		public byte[] LengthByteArray
		{
			get
			{
				return BitConverter.GetBytes((short)this.AddressByteArray.Length);
			}
		}
	}
}
